class CreateBlogs < ActiveRecord::Migration
  def self.up
    create_table :blogs do |t|
      t.integer :accounts_id
      t.string :title
      t.text :content
      t.integer :view, :default => 0
      t.timestamps
    end
    add_index :blogs, :accounts_id, :name=>"fk_accounts_blog"
  end

  def self.down
    drop_table :blogs
  end
end
